<html>
<head><meta charset="utf-8"><title>Marking default implementations on trait functions · rustdoc · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/index.html">rustdoc</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Marking.20default.20implementations.20on.20trait.20functions.html">Marking default implementations on trait functions</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="247306643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Marking%20default%20implementations%20on%20trait%20functions/near/247306643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Christopher Jefferson <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Marking.20default.20implementations.20on.20trait.20functions.html#247306643">(Jul 27 2021 at 08:27)</a>:</h4>
<p>(Sorry if I'm in the wrong place)</p>
<p>Only today did I discover that <code>{ ... }</code> under a function in a trait in rustdoc means "This function has a default implementation". I realise this makes sense if you think of the doc as actual code, but I missed it.</p>
<p>Perhaps this could be made more obvious, perhaps something like <code>{ ... /* default implementation */ }</code> ?</p>



<a name="247307944"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Marking%20default%20implementations%20on%20trait%20functions/near/247307944" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Marking.20default.20implementations.20on.20trait.20functions.html#247307944">(Jul 27 2021 at 08:43)</a>:</h4>
<p>Or even <code>{ /* default implementation */ }</code>. But otherwise I think it's a good idea!</p>



<a name="247308027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/266220-rustdoc/topic/Marking%20default%20implementations%20on%20trait%20functions/near/247308027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> GuillaumeGomez <a href="https://rust-lang.github.io/zulip_archive/stream/266220-rustdoc/topic/Marking.20default.20implementations.20on.20trait.20functions.html#247308027">(Jul 27 2021 at 08:44)</a>:</h4>
<p>Please open an issue on rust-lang/rust repository. If you want you can make the implementation as well, I think it'd be easy. ;)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>